package com.doctor.ui.consulting.presenter;

import android.content.Context;

import com.doctor.ui.consulting.model.ConsultationListModelImpl;
import com.doctor.ui.consulting.model.IConsultationListModel;
import com.doctor.ui.consulting.view.IConsultationView;
import com.doctor.utils.callback.DownloadCompleteListener;

/**
 * Created by chemin on 2017/3/12 16:35.
 */

public class ConsultationPresenter {
    private IConsultationView mView;
    private IConsultationListModel mModel;
    private Context mContext;

    public ConsultationPresenter(IConsultationView mView) {
        this.mView = mView;
        this.mModel=new ConsultationListModelImpl();
        mContext=mView.getContext();
    }

    /**
     * 获取已有病例
     */
    public void getRecordData(){
        mModel.getRecodrdList(mContext, new DownloadCompleteListener() {
            @Override
            public void downLoadSuccess(Object obj) {
                mView.updateRecordeData(obj);
            }

            @Override
            public void downLoadError(int code, String message) {
                mView.showToast(message);
            }
        });
    }


}
